/*************************************************************************
> File Name: friend.h
> Author: hzy
> Created Time: 2023-08-11 10:36:06
> Description: 类友元函数
************************************************************************/
#ifndef _FRIEND_H_
#define _FRIEND_H_

#include <iostream>
using namespace std;

#include "B.h"

class Friend
{
private:
    int val;

public:
    Friend(int myval) : val(myval) {}

    void setVal(int myval);
    int getVal();

    //friend class B;
    friend void B::setObjVal(Friend &obj, int myval);
    friend int B::getObjVal(Friend obj);
    friend void B::showObj(Friend obj);
};

#endif